<html>
<head><title>xmlrpc</title></head>
<body>
<?php
	include '../AtacAPI/Auth.php';
	include '../AtacAPI/Paline.php';
	include '../AtacCommunicator/ACBusWaitingTimes.php';
	$atacCom = new ACBusWaitingTimes();
	echo "#####TEST getPathIDsForLineNumber ####<br>";
	$listPercorsi = $atacCom->getPathIDsForLineNumber_NEW(31);
	foreach($listPercorsi as $percorso)
	{
		echo "percorso: ".$percorso."<br>";
	}
	$listPercorsi2 = $atacCom->getPathIDsForLineNumber(31);
	foreach($listPercorsi2 as $percorso)
	{
		echo "percorso orig: ".$percorso."<br>";
	}
	
	echo "######TEST getPath ##########<br>";
	$busPath = $atacCom->getPath_NEW(10274);
	$busPath2 = $atacCom->getPath(10274);
	

	if ($busPath->toXML(COMPACT_MODE) == $busPath2->toXML(COMPACT_MODE))
	{		
		echo "UGUALI<br>";
	}
	else 
	{
		echo "DIVERSI<br>";	
	}

	echo "#####TEST getIncomingBusesAtStop####<br>";
	$stop = new BusStop(null, 74635);

	$xml1 = "";
	$busStop = $atacCom->getIncomingBusesAtStop($stop);
	foreach($busStop as $bus)
	{		
		$xml1 = $xml1.$bus->toXML(COMPACT_MODE);
	}


	$xml2 = "";
	$busStop2 = $atacCom->getIncomingBusesAtStop_NEW($stop);
	foreach($busStop2 as $bus2)
	{
		$xml2 = $xml2.$bus2->toXML(COMPACT_MODE);
		
	}
	echo "xml1: ".$xml1."<br>";
 	echo "xml2: ".$xml2."<br>";
	if ($xml1 == $xml2)
	{
		echo "UGUALI";
	}
	else
	{
		echo "DIVERSI";
	}
?>
</body>
</html>
